#-*-coding:utf-8 -*-
def producer(c):
    c.send(None)
    n = 0
    while n < 5:
        n = n+1
        print(u'生产者，生产了....%s' %n)
        r = c.send(n)
        print(u'生产者收到了回馈。。。%s' %r)
    c.close()

def consumer():
    r = ''
    while True:
        n = yield r
        if not n:
            return
        else:
            print(u'消费者，消费了。。。。。%s' %n)


c = consumer()
producer(c)